Public Class ICproductsEdit
    Inherits System.Windows.Forms.Form
    'Dim icp As ICproducts
    Dim Group1Code As Integer
    Dim Group2Code As Integer
    Dim Group3Code As Integer
    Dim Group4Code As Integer
    Dim Group5Code As Integer
    Dim Group6Code As Integer
    Dim Group7Code As Integer
    Dim Group8Code As Integer
    Dim ProdID As Integer
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents Label23 As System.Windows.Forms.Label
    Friend WithEvents Label24 As System.Windows.Forms.Label
    Friend WithEvents Label25 As System.Windows.Forms.Label
    Friend WithEvents Label26 As System.Windows.Forms.Label
    Friend WithEvents Label27 As System.Windows.Forms.Label
    Friend WithEvents cmbDept As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbBrand As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbMfr As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbCat As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbSubCat As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmbSubSubCat As DevComponents.DotNetBar.Controls.ComboBoxEx
    Friend WithEvents cmdSave As DevComponents.DotNetBar.ButtonX
    Friend WithEvents cmdExit As DevComponents.DotNetBar.ButtonX
    Friend WithEvents GroupPanel1 As DevComponents.DotNetBar.Controls.GroupPanel
    Dim OldProdCode As String
#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents chWhProduct As System.Windows.Forms.CheckBox
    Friend WithEvents cmbLead As System.Windows.Forms.ComboBox
    Friend WithEvents chActive As System.Windows.Forms.CheckBox
    Friend WithEvents cmbUnit As System.Windows.Forms.ComboBox
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents tbLeadTime As System.Windows.Forms.TextBox
    Friend WithEvents tbOuterPack As System.Windows.Forms.TextBox
    Friend WithEvents tbImageFile As System.Windows.Forms.TextBox
    Friend WithEvents tbROL As System.Windows.Forms.TextBox
    Friend WithEvents tbMarkup3 As System.Windows.Forms.TextBox
    Friend WithEvents tbMarkup2 As System.Windows.Forms.TextBox
    Friend WithEvents tbMarkup1 As System.Windows.Forms.TextBox
    Friend WithEvents tbPrice3 As System.Windows.Forms.TextBox
    Friend WithEvents tbPrice2 As System.Windows.Forms.TextBox
    Friend WithEvents tbPrice1 As System.Windows.Forms.TextBox
    Friend WithEvents tbLongDescA As System.Windows.Forms.TextBox
    Friend WithEvents tbLongDescE As System.Windows.Forms.TextBox
    Friend WithEvents tbShortDescA As System.Windows.Forms.TextBox
    Friend WithEvents tbShortDescE As System.Windows.Forms.TextBox
    Friend WithEvents tbManuf As System.Windows.Forms.TextBox
    Friend WithEvents tbProdCode As System.Windows.Forms.TextBox
    Friend WithEvents cmbPack As System.Windows.Forms.ComboBox
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents dgShowroom As System.Windows.Forms.DataGrid
    Friend WithEvents btnImage As System.Windows.Forms.Button
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents pbImage As System.Windows.Forms.PictureBox
    Friend WithEvents chKit As System.Windows.Forms.CheckBox
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents chOnPromotion As System.Windows.Forms.CheckBox
    Friend WithEvents rbNonStock As System.Windows.Forms.RadioButton
    Friend WithEvents rbSample As System.Windows.Forms.RadioButton
    Friend WithEvents rbStock As System.Windows.Forms.RadioButton
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents ttHelp As System.Windows.Forms.ToolTip
    Friend WithEvents dlgOpen As System.Windows.Forms.OpenFileDialog
    Friend WithEvents dgSuppliers As System.Windows.Forms.DataGrid
    Friend WithEvents Label21 As System.Windows.Forms.Label
    Friend WithEvents dgBarcode As System.Windows.Forms.DataGrid
    Friend WithEvents chDiscontinued As System.Windows.Forms.CheckBox
    Friend WithEvents cbBlocked As System.Windows.Forms.CheckBox
    Friend WithEvents cmbGroup7 As System.Windows.Forms.ComboBox
    Friend WithEvents cbCompDiscontinued As System.Windows.Forms.CheckBox
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents rbRangedOut As System.Windows.Forms.RadioButton
    Friend WithEvents rbTempDisc As System.Windows.Forms.RadioButton
    Friend WithEvents rbActiveProd As System.Windows.Forms.RadioButton
    Friend WithEvents rbTobePurged As System.Windows.Forms.RadioButton
    Friend WithEvents cmbGroup8 As System.Windows.Forms.ComboBox
    Friend WithEvents rbPCI As System.Windows.Forms.RadioButton
    Friend WithEvents rbNIOH As System.Windows.Forms.RadioButton
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ICproductsEdit))
        Me.Label22 = New System.Windows.Forms.Label()
        Me.chWhProduct = New System.Windows.Forms.CheckBox()
        Me.cmbLead = New System.Windows.Forms.ComboBox()
        Me.chActive = New System.Windows.Forms.CheckBox()
        Me.cmbUnit = New System.Windows.Forms.ComboBox()
        Me.Label20 = New System.Windows.Forms.Label()
        Me.tbLeadTime = New System.Windows.Forms.TextBox()
        Me.tbOuterPack = New System.Windows.Forms.TextBox()
        Me.tbImageFile = New System.Windows.Forms.TextBox()
        Me.tbROL = New System.Windows.Forms.TextBox()
        Me.tbMarkup3 = New System.Windows.Forms.TextBox()
        Me.tbMarkup2 = New System.Windows.Forms.TextBox()
        Me.tbMarkup1 = New System.Windows.Forms.TextBox()
        Me.tbPrice3 = New System.Windows.Forms.TextBox()
        Me.tbPrice2 = New System.Windows.Forms.TextBox()
        Me.tbPrice1 = New System.Windows.Forms.TextBox()
        Me.tbLongDescA = New System.Windows.Forms.TextBox()
        Me.tbLongDescE = New System.Windows.Forms.TextBox()
        Me.tbShortDescA = New System.Windows.Forms.TextBox()
        Me.tbShortDescE = New System.Windows.Forms.TextBox()
        Me.tbManuf = New System.Windows.Forms.TextBox()
        Me.tbProdCode = New System.Windows.Forms.TextBox()
        Me.cmbPack = New System.Windows.Forms.ComboBox()
        Me.Label19 = New System.Windows.Forms.Label()
        Me.Label18 = New System.Windows.Forms.Label()
        Me.Label17 = New System.Windows.Forms.Label()
        Me.Label16 = New System.Windows.Forms.Label()
        Me.dgShowroom = New System.Windows.Forms.DataGrid()
        Me.btnImage = New System.Windows.Forms.Button()
        Me.Label15 = New System.Windows.Forms.Label()
        Me.pbImage = New System.Windows.Forms.PictureBox()
        Me.chKit = New System.Windows.Forms.CheckBox()
        Me.Label14 = New System.Windows.Forms.Label()
        Me.Label11 = New System.Windows.Forms.Label()
        Me.Label12 = New System.Windows.Forms.Label()
        Me.Label13 = New System.Windows.Forms.Label()
        Me.Label10 = New System.Windows.Forms.Label()
        Me.Label9 = New System.Windows.Forms.Label()
        Me.Label8 = New System.Windows.Forms.Label()
        Me.Label7 = New System.Windows.Forms.Label()
        Me.Label6 = New System.Windows.Forms.Label()
        Me.Label5 = New System.Windows.Forms.Label()
        Me.Label4 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.chOnPromotion = New System.Windows.Forms.CheckBox()
        Me.rbNonStock = New System.Windows.Forms.RadioButton()
        Me.rbSample = New System.Windows.Forms.RadioButton()
        Me.rbStock = New System.Windows.Forms.RadioButton()
        Me.GroupBox1 = New System.Windows.Forms.GroupBox()
        Me.ttHelp = New System.Windows.Forms.ToolTip(Me.components)
        Me.dgBarcode = New System.Windows.Forms.DataGrid()
        Me.dlgOpen = New System.Windows.Forms.OpenFileDialog()
        Me.dgSuppliers = New System.Windows.Forms.DataGrid()
        Me.Label21 = New System.Windows.Forms.Label()
        Me.chDiscontinued = New System.Windows.Forms.CheckBox()
        Me.cbBlocked = New System.Windows.Forms.CheckBox()
        Me.cmbGroup7 = New System.Windows.Forms.ComboBox()
        Me.cbCompDiscontinued = New System.Windows.Forms.CheckBox()
        Me.GroupBox2 = New System.Windows.Forms.GroupBox()
        Me.rbPCI = New System.Windows.Forms.RadioButton()
        Me.rbNIOH = New System.Windows.Forms.RadioButton()
        Me.rbTobePurged = New System.Windows.Forms.RadioButton()
        Me.rbRangedOut = New System.Windows.Forms.RadioButton()
        Me.rbTempDisc = New System.Windows.Forms.RadioButton()
        Me.rbActiveProd = New System.Windows.Forms.RadioButton()
        Me.cmbGroup8 = New System.Windows.Forms.ComboBox()
        Me.GroupBox3 = New System.Windows.Forms.GroupBox()
        Me.Label23 = New System.Windows.Forms.Label()
        Me.Label24 = New System.Windows.Forms.Label()
        Me.Label25 = New System.Windows.Forms.Label()
        Me.Label26 = New System.Windows.Forms.Label()
        Me.Label27 = New System.Windows.Forms.Label()
        Me.cmbDept = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbBrand = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbMfr = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbCat = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbSubCat = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmbSubSubCat = New DevComponents.DotNetBar.Controls.ComboBoxEx()
        Me.cmdSave = New DevComponents.DotNetBar.ButtonX()
        Me.cmdExit = New DevComponents.DotNetBar.ButtonX()
        Me.GroupPanel1 = New DevComponents.DotNetBar.Controls.GroupPanel()
        CType(Me.dgShowroom, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.pbImage, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox1.SuspendLayout()
        CType(Me.dgBarcode, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.dgSuppliers, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox2.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        Me.GroupPanel1.SuspendLayout()
        Me.SuspendLayout()
        '
        'Label22
        '
        Me.Label22.AutoSize = True
        Me.Label22.BackColor = System.Drawing.Color.Transparent
        Me.Label22.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label22.Location = New System.Drawing.Point(22, 247)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(83, 18)
        Me.Label22.TabIndex = 128
        Me.Label22.Text = "Department"
        '
        'chWhProduct
        '
        Me.chWhProduct.AutoSize = True
        Me.chWhProduct.Checked = True
        Me.chWhProduct.CheckState = System.Windows.Forms.CheckState.Checked
        Me.chWhProduct.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.chWhProduct.Location = New System.Drawing.Point(12, 102)
        Me.chWhProduct.Name = "chWhProduct"
        Me.chWhProduct.Size = New System.Drawing.Size(100, 22)
        Me.chWhProduct.TabIndex = 127
        Me.chWhProduct.Text = "WH Product"
        Me.chWhProduct.Visible = False
        '
        'cmbLead
        '
        Me.cmbLead.BackColor = System.Drawing.Color.AliceBlue
        Me.cmbLead.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbLead.Items.AddRange(New Object() {"DAYS", "MONTHS"})
        Me.cmbLead.Location = New System.Drawing.Point(101, 84)
        Me.cmbLead.Name = "cmbLead"
        Me.cmbLead.Size = New System.Drawing.Size(76, 26)
        Me.cmbLead.TabIndex = 126
        Me.cmbLead.Visible = False
        '
        'chActive
        '
        Me.chActive.AutoSize = True
        Me.chActive.Checked = True
        Me.chActive.CheckState = System.Windows.Forms.CheckState.Checked
        Me.chActive.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.chActive.Location = New System.Drawing.Point(12, 58)
        Me.chActive.Name = "chActive"
        Me.chActive.Size = New System.Drawing.Size(65, 22)
        Me.chActive.TabIndex = 125
        Me.chActive.Text = "Active"
        Me.chActive.Visible = False
        '
        'cmbUnit
        '
        Me.cmbUnit.BackColor = System.Drawing.Color.AliceBlue
        Me.cmbUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbUnit.Items.AddRange(New Object() {"PCS", "CTN"})
        Me.cmbUnit.Location = New System.Drawing.Point(546, 163)
        Me.cmbUnit.Name = "cmbUnit"
        Me.cmbUnit.Size = New System.Drawing.Size(99, 26)
        Me.cmbUnit.TabIndex = 124
        '
        'Label20
        '
        Me.Label20.AutoSize = True
        Me.Label20.BackColor = System.Drawing.Color.Transparent
        Me.Label20.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label20.Location = New System.Drawing.Point(548, 119)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(63, 18)
        Me.Label20.TabIndex = 123
        Me.Label20.Text = "Sale Unit"
        '
        'tbLeadTime
        '
        Me.tbLeadTime.BackColor = System.Drawing.Color.AliceBlue
        Me.tbLeadTime.Location = New System.Drawing.Point(101, 53)
        Me.tbLeadTime.Name = "tbLeadTime"
        Me.tbLeadTime.Size = New System.Drawing.Size(51, 26)
        Me.tbLeadTime.TabIndex = 122
        Me.tbLeadTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.tbLeadTime.Visible = False
        '
        'tbOuterPack
        '
        Me.tbOuterPack.BackColor = System.Drawing.Color.AliceBlue
        Me.tbOuterPack.Location = New System.Drawing.Point(101, 112)
        Me.tbOuterPack.Name = "tbOuterPack"
        Me.tbOuterPack.Size = New System.Drawing.Size(66, 26)
        Me.tbOuterPack.TabIndex = 120
        Me.tbOuterPack.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.tbOuterPack.Visible = False
        '
        'tbImageFile
        '
        Me.tbImageFile.BackColor = System.Drawing.Color.White
        Me.tbImageFile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbImageFile.ForeColor = System.Drawing.Color.Black
        Me.tbImageFile.Location = New System.Drawing.Point(474, 105)
        Me.tbImageFile.Name = "tbImageFile"
        Me.tbImageFile.Size = New System.Drawing.Size(309, 26)
        Me.tbImageFile.TabIndex = 112
        '
        'tbROL
        '
        Me.tbROL.BackColor = System.Drawing.Color.AliceBlue
        Me.tbROL.Location = New System.Drawing.Point(98, 20)
        Me.tbROL.Name = "tbROL"
        Me.tbROL.Size = New System.Drawing.Size(66, 26)
        Me.tbROL.TabIndex = 109
        Me.tbROL.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.tbROL.Visible = False
        '
        'tbMarkup3
        '
        Me.tbMarkup3.BackColor = System.Drawing.Color.White
        Me.tbMarkup3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbMarkup3.ForeColor = System.Drawing.Color.Black
        Me.tbMarkup3.Location = New System.Drawing.Point(465, 226)
        Me.tbMarkup3.Name = "tbMarkup3"
        Me.tbMarkup3.ReadOnly = True
        Me.tbMarkup3.Size = New System.Drawing.Size(75, 26)
        Me.tbMarkup3.TabIndex = 107
        Me.tbMarkup3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbMarkup2
        '
        Me.tbMarkup2.BackColor = System.Drawing.Color.White
        Me.tbMarkup2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbMarkup2.ForeColor = System.Drawing.Color.Black
        Me.tbMarkup2.Location = New System.Drawing.Point(385, 226)
        Me.tbMarkup2.Name = "tbMarkup2"
        Me.tbMarkup2.ReadOnly = True
        Me.tbMarkup2.Size = New System.Drawing.Size(75, 26)
        Me.tbMarkup2.TabIndex = 105
        Me.tbMarkup2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbMarkup1
        '
        Me.tbMarkup1.BackColor = System.Drawing.Color.White
        Me.tbMarkup1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbMarkup1.ForeColor = System.Drawing.Color.Black
        Me.tbMarkup1.Location = New System.Drawing.Point(305, 226)
        Me.tbMarkup1.Name = "tbMarkup1"
        Me.tbMarkup1.ReadOnly = True
        Me.tbMarkup1.Size = New System.Drawing.Size(75, 26)
        Me.tbMarkup1.TabIndex = 103
        Me.tbMarkup1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbPrice3
        '
        Me.tbPrice3.BackColor = System.Drawing.Color.White
        Me.tbPrice3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbPrice3.ForeColor = System.Drawing.Color.Black
        Me.tbPrice3.Location = New System.Drawing.Point(465, 163)
        Me.tbPrice3.Name = "tbPrice3"
        Me.tbPrice3.ReadOnly = True
        Me.tbPrice3.Size = New System.Drawing.Size(75, 26)
        Me.tbPrice3.TabIndex = 101
        Me.tbPrice3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbPrice2
        '
        Me.tbPrice2.BackColor = System.Drawing.Color.White
        Me.tbPrice2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbPrice2.ForeColor = System.Drawing.Color.Black
        Me.tbPrice2.Location = New System.Drawing.Point(385, 163)
        Me.tbPrice2.Name = "tbPrice2"
        Me.tbPrice2.ReadOnly = True
        Me.tbPrice2.Size = New System.Drawing.Size(75, 26)
        Me.tbPrice2.TabIndex = 99
        Me.tbPrice2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbPrice1
        '
        Me.tbPrice1.BackColor = System.Drawing.Color.White
        Me.tbPrice1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbPrice1.ForeColor = System.Drawing.Color.Black
        Me.tbPrice1.Location = New System.Drawing.Point(305, 163)
        Me.tbPrice1.Name = "tbPrice1"
        Me.tbPrice1.ReadOnly = True
        Me.tbPrice1.Size = New System.Drawing.Size(75, 26)
        Me.tbPrice1.TabIndex = 97
        Me.tbPrice1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbLongDescA
        '
        Me.tbLongDescA.BackColor = System.Drawing.Color.White
        Me.tbLongDescA.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbLongDescA.ForeColor = System.Drawing.Color.Black
        Me.tbLongDescA.Location = New System.Drawing.Point(210, 105)
        Me.tbLongDescA.Name = "tbLongDescA"
        Me.tbLongDescA.Size = New System.Drawing.Size(259, 26)
        Me.tbLongDescA.TabIndex = 94
        Me.tbLongDescA.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbLongDescE
        '
        Me.tbLongDescE.BackColor = System.Drawing.Color.White
        Me.tbLongDescE.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbLongDescE.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.tbLongDescE.ForeColor = System.Drawing.Color.Black
        Me.tbLongDescE.Location = New System.Drawing.Point(640, 46)
        Me.tbLongDescE.Name = "tbLongDescE"
        Me.tbLongDescE.Size = New System.Drawing.Size(313, 26)
        Me.tbLongDescE.TabIndex = 92
        '
        'tbShortDescA
        '
        Me.tbShortDescA.BackColor = System.Drawing.Color.White
        Me.tbShortDescA.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbShortDescA.ForeColor = System.Drawing.Color.Black
        Me.tbShortDescA.Location = New System.Drawing.Point(22, 105)
        Me.tbShortDescA.Name = "tbShortDescA"
        Me.tbShortDescA.Size = New System.Drawing.Size(183, 26)
        Me.tbShortDescA.TabIndex = 90
        Me.tbShortDescA.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'tbShortDescE
        '
        Me.tbShortDescE.BackColor = System.Drawing.Color.White
        Me.tbShortDescE.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbShortDescE.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.tbShortDescE.ForeColor = System.Drawing.Color.Black
        Me.tbShortDescE.Location = New System.Drawing.Point(368, 46)
        Me.tbShortDescE.Name = "tbShortDescE"
        Me.tbShortDescE.Size = New System.Drawing.Size(265, 26)
        Me.tbShortDescE.TabIndex = 88
        '
        'tbManuf
        '
        Me.tbManuf.BackColor = System.Drawing.Color.White
        Me.tbManuf.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbManuf.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
        Me.tbManuf.ForeColor = System.Drawing.Color.Black
        Me.tbManuf.Location = New System.Drawing.Point(209, 46)
        Me.tbManuf.Name = "tbManuf"
        Me.tbManuf.Size = New System.Drawing.Size(152, 26)
        Me.tbManuf.TabIndex = 84
        '
        'tbProdCode
        '
        Me.tbProdCode.BackColor = System.Drawing.Color.White
        Me.tbProdCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.tbProdCode.ForeColor = System.Drawing.Color.Black
        Me.tbProdCode.Location = New System.Drawing.Point(22, 46)
        Me.tbProdCode.Name = "tbProdCode"
        Me.tbProdCode.ReadOnly = True
        Me.tbProdCode.Size = New System.Drawing.Size(183, 26)
        Me.tbProdCode.TabIndex = 83
        '
        'cmbPack
        '
        Me.cmbPack.BackColor = System.Drawing.Color.AliceBlue
        Me.cmbPack.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbPack.Items.AddRange(New Object() {"CFT", "CBM"})
        Me.cmbPack.Location = New System.Drawing.Point(101, 138)
        Me.cmbPack.Name = "cmbPack"
        Me.cmbPack.Size = New System.Drawing.Size(51, 26)
        Me.cmbPack.TabIndex = 121
        Me.cmbPack.Visible = False
        '
        'Label19
        '
        Me.Label19.AutoSize = True
        Me.Label19.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label19.Location = New System.Drawing.Point(12, 130)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(71, 18)
        Me.Label19.TabIndex = 119
        Me.Label19.Text = "Lead Time"
        Me.Label19.Visible = False
        '
        'Label18
        '
        Me.Label18.AutoSize = True
        Me.Label18.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label18.Location = New System.Drawing.Point(12, 183)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(87, 18)
        Me.Label18.TabIndex = 118
        Me.Label18.Text = "Pack Volume"
        Me.Label18.Visible = False
        '
        'Label17
        '
        Me.Label17.AutoSize = True
        Me.Label17.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label17.Location = New System.Drawing.Point(12, 168)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(103, 18)
        Me.Label17.TabIndex = 117
        Me.Label17.Text = "Outer Pack Size"
        Me.Label17.Visible = False
        '
        'Label16
        '
        Me.Label16.AutoSize = True
        Me.Label16.BackColor = System.Drawing.Color.Transparent
        Me.Label16.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label16.Location = New System.Drawing.Point(310, 241)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(169, 18)
        Me.Label16.TabIndex = 116
        Me.Label16.Text = "Showrooms Minimum Qty"
        '
        'dgShowroom
        '
        Me.dgShowroom.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.dgShowroom.CaptionVisible = False
        Me.dgShowroom.DataMember = ""
        Me.dgShowroom.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.dgShowroom.Location = New System.Drawing.Point(309, 285)
        Me.dgShowroom.Name = "dgShowroom"
        Me.dgShowroom.RowHeadersVisible = False
        Me.dgShowroom.Size = New System.Drawing.Size(231, 92)
        Me.dgShowroom.TabIndex = 115
        '
        'btnImage
        '
        Me.btnImage.BackColor = System.Drawing.Color.SteelBlue
        Me.btnImage.Image = CType(resources.GetObject("btnImage.Image"), System.Drawing.Image)
        Me.btnImage.Location = New System.Drawing.Point(754, 83)
        Me.btnImage.Name = "btnImage"
        Me.btnImage.Size = New System.Drawing.Size(27, 22)
        Me.btnImage.TabIndex = 114
        Me.btnImage.UseVisualStyleBackColor = False
        '
        'Label15
        '
        Me.Label15.AutoSize = True
        Me.Label15.BackColor = System.Drawing.Color.Transparent
        Me.Label15.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label15.Location = New System.Drawing.Point(473, 61)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(111, 18)
        Me.Label15.TabIndex = 113
        Me.Label15.Text = "Image File Path.."
        '
        'pbImage
        '
        Me.pbImage.BackColor = System.Drawing.Color.LightSlateGray
        Me.pbImage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.pbImage.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.pbImage.Location = New System.Drawing.Point(546, 393)
        Me.pbImage.Name = "pbImage"
        Me.pbImage.Size = New System.Drawing.Size(144, 66)
        Me.pbImage.TabIndex = 111
        Me.pbImage.TabStop = False
        '
        'chKit
        '
        Me.chKit.AutoSize = True
        Me.chKit.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.chKit.Location = New System.Drawing.Point(14, 82)
        Me.chKit.Name = "chKit"
        Me.chKit.Size = New System.Drawing.Size(44, 22)
        Me.chKit.TabIndex = 110
        Me.chKit.Text = "Kit"
        Me.chKit.Visible = False
        '
        'Label14
        '
        Me.Label14.AutoSize = True
        Me.Label14.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label14.Location = New System.Drawing.Point(12, 154)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(57, 18)
        Me.Label14.TabIndex = 108
        Me.Label14.Text = "ROL Qty"
        Me.Label14.Visible = False
        '
        'Label11
        '
        Me.Label11.AutoSize = True
        Me.Label11.BackColor = System.Drawing.Color.Transparent
        Me.Label11.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label11.Location = New System.Drawing.Point(466, 182)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(69, 18)
        Me.Label11.TabIndex = 106
        Me.Label11.Text = "Markup %"
        '
        'Label12
        '
        Me.Label12.AutoSize = True
        Me.Label12.BackColor = System.Drawing.Color.Transparent
        Me.Label12.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label12.Location = New System.Drawing.Point(385, 181)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(69, 18)
        Me.Label12.TabIndex = 104
        Me.Label12.Text = "Markup %"
        '
        'Label13
        '
        Me.Label13.AutoSize = True
        Me.Label13.BackColor = System.Drawing.Color.Transparent
        Me.Label13.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label13.Location = New System.Drawing.Point(303, 181)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(69, 18)
        Me.Label13.TabIndex = 102
        Me.Label13.Text = "Markup %"
        '
        'Label10
        '
        Me.Label10.AutoSize = True
        Me.Label10.BackColor = System.Drawing.Color.Transparent
        Me.Label10.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label10.Location = New System.Drawing.Point(465, 120)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(49, 18)
        Me.Label10.TabIndex = 100
        Me.Label10.Text = "Price 3"
        '
        'Label9
        '
        Me.Label9.AutoSize = True
        Me.Label9.BackColor = System.Drawing.Color.Transparent
        Me.Label9.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label9.Location = New System.Drawing.Point(385, 120)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(49, 18)
        Me.Label9.TabIndex = 98
        Me.Label9.Text = "Price 2"
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        Me.Label8.BackColor = System.Drawing.Color.Transparent
        Me.Label8.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label8.Location = New System.Drawing.Point(305, 120)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(49, 18)
        Me.Label8.TabIndex = 96
        Me.Label8.Text = "Price 1"
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.BackColor = System.Drawing.Color.Transparent
        Me.Label7.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label7.Location = New System.Drawing.Point(321, 60)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(145, 18)
        Me.Label7.TabIndex = 95
        Me.Label7.Text = "Long Description (Arb)"
        Me.Label7.TextAlign = System.Drawing.ContentAlignment.TopRight
        '
        'Label6
        '
        Me.Label6.AutoSize = True
        Me.Label6.BackColor = System.Drawing.Color.Transparent
        Me.Label6.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label6.Location = New System.Drawing.Point(639, 1)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(145, 18)
        Me.Label6.TabIndex = 93
        Me.Label6.Text = "Long Description (Eng)"
        '
        'Label5
        '
        Me.Label5.AutoSize = True
        Me.Label5.BackColor = System.Drawing.Color.Transparent
        Me.Label5.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label5.Location = New System.Drawing.Point(50, 60)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(149, 18)
        Me.Label5.TabIndex = 91
        Me.Label5.Text = "Short Description (Arb)"
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.TopRight
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.BackColor = System.Drawing.Color.Transparent
        Me.Label4.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label4.Location = New System.Drawing.Point(369, 2)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(149, 18)
        Me.Label4.TabIndex = 89
        Me.Label4.Text = "Short Description (Eng)"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.BackColor = System.Drawing.Color.Transparent
        Me.Label3.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label3.Location = New System.Drawing.Point(21, 116)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(69, 18)
        Me.Label3.TabIndex = 87
        Me.Label3.Text = "Bar Codes"
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.BackColor = System.Drawing.Color.Transparent
        Me.Label2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label2.Location = New System.Drawing.Point(208, 3)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(116, 18)
        Me.Label2.TabIndex = 86
        Me.Label2.Text = "Manuf.Prod.Code"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.BackColor = System.Drawing.Color.Transparent
        Me.Label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label1.Location = New System.Drawing.Point(21, 2)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(91, 18)
        Me.Label1.TabIndex = 82
        Me.Label1.Text = "Product Code"
        '
        'chOnPromotion
        '
        Me.chOnPromotion.AutoSize = True
        Me.chOnPromotion.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.chOnPromotion.Location = New System.Drawing.Point(12, 39)
        Me.chOnPromotion.Name = "chOnPromotion"
        Me.chOnPromotion.Size = New System.Drawing.Size(113, 22)
        Me.chOnPromotion.TabIndex = 81
        Me.chOnPromotion.Text = "On Promotion"
        Me.chOnPromotion.Visible = False
        '
        'rbNonStock
        '
        Me.rbNonStock.AutoSize = True
        Me.rbNonStock.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbNonStock.Location = New System.Drawing.Point(11, 80)
        Me.rbNonStock.Name = "rbNonStock"
        Me.rbNonStock.Size = New System.Drawing.Size(90, 22)
        Me.rbNonStock.TabIndex = 80
        Me.rbNonStock.Text = "Non-Stock"
        '
        'rbSample
        '
        Me.rbSample.AutoSize = True
        Me.rbSample.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbSample.Location = New System.Drawing.Point(11, 54)
        Me.rbSample.Name = "rbSample"
        Me.rbSample.Size = New System.Drawing.Size(78, 22)
        Me.rbSample.TabIndex = 79
        Me.rbSample.Text = "Samples"
        '
        'rbStock
        '
        Me.rbStock.AutoSize = True
        Me.rbStock.Checked = True
        Me.rbStock.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbStock.Location = New System.Drawing.Point(11, 28)
        Me.rbStock.Name = "rbStock"
        Me.rbStock.Size = New System.Drawing.Size(59, 22)
        Me.rbStock.TabIndex = 78
        Me.rbStock.TabStop = True
        Me.rbStock.Text = "Stock"
        '
        'GroupBox1
        '
        Me.GroupBox1.BackColor = System.Drawing.Color.Transparent
        Me.GroupBox1.Controls.Add(Me.rbSample)
        Me.GroupBox1.Controls.Add(Me.rbNonStock)
        Me.GroupBox1.Controls.Add(Me.rbStock)
        Me.GroupBox1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.GroupBox1.Location = New System.Drawing.Point(185, 116)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(110, 112)
        Me.GroupBox1.TabIndex = 129
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Item Type"
        '
        'dgBarcode
        '
        Me.dgBarcode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.dgBarcode.CaptionVisible = False
        Me.dgBarcode.ColumnHeadersVisible = False
        Me.dgBarcode.DataMember = ""
        Me.dgBarcode.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.dgBarcode.Location = New System.Drawing.Point(22, 160)
        Me.dgBarcode.Name = "dgBarcode"
        Me.dgBarcode.RowHeadersVisible = False
        Me.dgBarcode.Size = New System.Drawing.Size(155, 92)
        Me.dgBarcode.TabIndex = 132
        Me.ttHelp.SetToolTip(Me.dgBarcode, "Scan ONE barcode per line")
        '
        'dgSuppliers
        '
        Me.dgSuppliers.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.dgSuppliers.CaptionVisible = False
        Me.dgSuppliers.DataMember = ""
        Me.dgSuppliers.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.dgSuppliers.Location = New System.Drawing.Point(546, 226)
        Me.dgSuppliers.Name = "dgSuppliers"
        Me.dgSuppliers.RowHeadersVisible = False
        Me.dgSuppliers.Size = New System.Drawing.Size(234, 161)
        Me.dgSuppliers.TabIndex = 130
        '
        'Label21
        '
        Me.Label21.AutoSize = True
        Me.Label21.BackColor = System.Drawing.Color.Transparent
        Me.Label21.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label21.Location = New System.Drawing.Point(549, 181)
        Me.Label21.Name = "Label21"
        Me.Label21.Size = New System.Drawing.Size(159, 18)
        Me.Label21.TabIndex = 131
        Me.Label21.Text = "Suppliers of this product"
        '
        'chDiscontinued
        '
        Me.chDiscontinued.AutoSize = True
        Me.chDiscontinued.BackColor = System.Drawing.Color.Transparent
        Me.chDiscontinued.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.chDiscontinued.Location = New System.Drawing.Point(543, 441)
        Me.chDiscontinued.Name = "chDiscontinued"
        Me.chDiscontinued.Size = New System.Drawing.Size(77, 22)
        Me.chDiscontinued.TabIndex = 133
        Me.chDiscontinued.Text = "PURGED"
        Me.chDiscontinued.UseVisualStyleBackColor = False
        '
        'cbBlocked
        '
        Me.cbBlocked.AutoSize = True
        Me.cbBlocked.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.cbBlocked.Location = New System.Drawing.Point(92, 171)
        Me.cbBlocked.Name = "cbBlocked"
        Me.cbBlocked.Size = New System.Drawing.Size(76, 22)
        Me.cbBlocked.TabIndex = 134
        Me.cbBlocked.Text = "Blocked"
        Me.cbBlocked.Visible = False
        '
        'cmbGroup7
        '
        Me.cmbGroup7.BackColor = System.Drawing.Color.White
        Me.cmbGroup7.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbGroup7.Location = New System.Drawing.Point(11, 238)
        Me.cmbGroup7.Name = "cmbGroup7"
        Me.cmbGroup7.Size = New System.Drawing.Size(66, 26)
        Me.cmbGroup7.TabIndex = 136
        Me.cmbGroup7.Visible = False
        '
        'cbCompDiscontinued
        '
        Me.cbCompDiscontinued.AutoSize = True
        Me.cbCompDiscontinued.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.cbCompDiscontinued.Location = New System.Drawing.Point(93, 185)
        Me.cbCompDiscontinued.Name = "cbCompDiscontinued"
        Me.cbCompDiscontinued.Size = New System.Drawing.Size(107, 22)
        Me.cbCompDiscontinued.TabIndex = 137
        Me.cbCompDiscontinued.Text = "Company Dis"
        Me.cbCompDiscontinued.Visible = False
        '
        'GroupBox2
        '
        Me.GroupBox2.BackColor = System.Drawing.Color.Transparent
        Me.GroupBox2.Controls.Add(Me.rbPCI)
        Me.GroupBox2.Controls.Add(Me.rbNIOH)
        Me.GroupBox2.Controls.Add(Me.rbTobePurged)
        Me.GroupBox2.Controls.Add(Me.rbRangedOut)
        Me.GroupBox2.Controls.Add(Me.rbTempDisc)
        Me.GroupBox2.Controls.Add(Me.rbActiveProd)
        Me.GroupBox2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.GroupBox2.Location = New System.Drawing.Point(795, 69)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(155, 183)
        Me.GroupBox2.TabIndex = 138
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "Product Indicator"
        '
        'rbPCI
        '
        Me.rbPCI.AutoSize = True
        Me.rbPCI.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbPCI.Location = New System.Drawing.Point(9, 150)
        Me.rbPCI.Name = "rbPCI"
        Me.rbPCI.Size = New System.Drawing.Size(126, 22)
        Me.rbPCI.TabIndex = 9
        Me.rbPCI.TabStop = True
        Me.rbPCI.Text = "Catalogue Items"
        '
        'rbNIOH
        '
        Me.rbNIOH.AutoSize = True
        Me.rbNIOH.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbNIOH.Location = New System.Drawing.Point(9, 125)
        Me.rbNIOH.Name = "rbNIOH"
        Me.rbNIOH.Size = New System.Drawing.Size(140, 22)
        Me.rbNIOH.TabIndex = 8
        Me.rbNIOH.Text = "New Item On Hold"
        '
        'rbTobePurged
        '
        Me.rbTobePurged.AutoSize = True
        Me.rbTobePurged.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbTobePurged.Location = New System.Drawing.Point(9, 100)
        Me.rbTobePurged.Name = "rbTobePurged"
        Me.rbTobePurged.Size = New System.Drawing.Size(106, 22)
        Me.rbTobePurged.TabIndex = 3
        Me.rbTobePurged.Text = "To Be Purged"
        '
        'rbRangedOut
        '
        Me.rbRangedOut.AutoSize = True
        Me.rbRangedOut.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbRangedOut.Location = New System.Drawing.Point(9, 74)
        Me.rbRangedOut.Name = "rbRangedOut"
        Me.rbRangedOut.Size = New System.Drawing.Size(87, 22)
        Me.rbRangedOut.TabIndex = 2
        Me.rbRangedOut.Text = "RangeOut"
        '
        'rbTempDisc
        '
        Me.rbTempDisc.AutoSize = True
        Me.rbTempDisc.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbTempDisc.Location = New System.Drawing.Point(9, 49)
        Me.rbTempDisc.Name = "rbTempDisc"
        Me.rbTempDisc.Size = New System.Drawing.Size(93, 22)
        Me.rbTempDisc.TabIndex = 1
        Me.rbTempDisc.Text = "Temp.Desc"
        '
        'rbActiveProd
        '
        Me.rbActiveProd.AutoSize = True
        Me.rbActiveProd.Checked = True
        Me.rbActiveProd.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.rbActiveProd.Location = New System.Drawing.Point(9, 23)
        Me.rbActiveProd.Name = "rbActiveProd"
        Me.rbActiveProd.Size = New System.Drawing.Size(115, 22)
        Me.rbActiveProd.TabIndex = 0
        Me.rbActiveProd.TabStop = True
        Me.rbActiveProd.Text = "Active Product"
        '
        'cmbGroup8
        '
        Me.cmbGroup8.BackColor = System.Drawing.Color.White
        Me.cmbGroup8.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbGroup8.Location = New System.Drawing.Point(11, 206)
        Me.cmbGroup8.Name = "cmbGroup8"
        Me.cmbGroup8.Size = New System.Drawing.Size(66, 26)
        Me.cmbGroup8.TabIndex = 139
        Me.cmbGroup8.Visible = False
        '
        'GroupBox3
        '
        Me.GroupBox3.Controls.Add(Me.chKit)
        Me.GroupBox3.Controls.Add(Me.cmbGroup8)
        Me.GroupBox3.Controls.Add(Me.chActive)
        Me.GroupBox3.Controls.Add(Me.chWhProduct)
        Me.GroupBox3.Controls.Add(Me.cmbGroup7)
        Me.GroupBox3.Controls.Add(Me.cbCompDiscontinued)
        Me.GroupBox3.Controls.Add(Me.chOnPromotion)
        Me.GroupBox3.Controls.Add(Me.Label14)
        Me.GroupBox3.Controls.Add(Me.Label19)
        Me.GroupBox3.Controls.Add(Me.cbBlocked)
        Me.GroupBox3.Controls.Add(Me.Label18)
        Me.GroupBox3.Controls.Add(Me.Label17)
        Me.GroupBox3.Controls.Add(Me.tbROL)
        Me.GroupBox3.Controls.Add(Me.cmbLead)
        Me.GroupBox3.Controls.Add(Me.tbLeadTime)
        Me.GroupBox3.Controls.Add(Me.tbOuterPack)
        Me.GroupBox3.Controls.Add(Me.cmbPack)
        Me.GroupBox3.Location = New System.Drawing.Point(1012, 12)
        Me.GroupBox3.Name = "GroupBox3"
        Me.GroupBox3.Size = New System.Drawing.Size(209, 285)
        Me.GroupBox3.TabIndex = 140
        Me.GroupBox3.TabStop = False
        Me.GroupBox3.Text = "GroupBox3"
        Me.GroupBox3.Visible = False
        '
        'Label23
        '
        Me.Label23.AutoSize = True
        Me.Label23.BackColor = System.Drawing.Color.Transparent
        Me.Label23.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label23.Location = New System.Drawing.Point(24, 301)
        Me.Label23.Name = "Label23"
        Me.Label23.Size = New System.Drawing.Size(44, 18)
        Me.Label23.TabIndex = 128
        Me.Label23.Text = "Brand"
        '
        'Label24
        '
        Me.Label24.AutoSize = True
        Me.Label24.BackColor = System.Drawing.Color.Transparent
        Me.Label24.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label24.Location = New System.Drawing.Point(21, 356)
        Me.Label24.Name = "Label24"
        Me.Label24.Size = New System.Drawing.Size(92, 18)
        Me.Label24.TabIndex = 128
        Me.Label24.Text = "Manufacturer"
        '
        'Label25
        '
        Me.Label25.AutoSize = True
        Me.Label25.BackColor = System.Drawing.Color.Transparent
        Me.Label25.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label25.Location = New System.Drawing.Point(23, 412)
        Me.Label25.Name = "Label25"
        Me.Label25.Size = New System.Drawing.Size(63, 18)
        Me.Label25.TabIndex = 128
        Me.Label25.Text = "Category"
        '
        'Label26
        '
        Me.Label26.AutoSize = True
        Me.Label26.BackColor = System.Drawing.Color.Transparent
        Me.Label26.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label26.Location = New System.Drawing.Point(309, 356)
        Me.Label26.Name = "Label26"
        Me.Label26.Size = New System.Drawing.Size(89, 18)
        Me.Label26.TabIndex = 128
        Me.Label26.Text = "Sub Category"
        '
        'Label27
        '
        Me.Label27.AutoSize = True
        Me.Label27.BackColor = System.Drawing.Color.Transparent
        Me.Label27.ForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.Label27.Location = New System.Drawing.Point(309, 412)
        Me.Label27.Name = "Label27"
        Me.Label27.Size = New System.Drawing.Size(115, 18)
        Me.Label27.TabIndex = 128
        Me.Label27.Text = "Sub Sub Category"
        '
        'cmbDept
        '
        Me.cmbDept.DisplayMember = "Text"
        Me.cmbDept.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbDept.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbDept.ItemHeight = 19
        Me.cmbDept.Location = New System.Drawing.Point(22, 293)
        Me.cmbDept.Name = "cmbDept"
        Me.cmbDept.Size = New System.Drawing.Size(219, 25)
        Me.cmbDept.TabIndex = 147
        '
        'cmbBrand
        '
        Me.cmbBrand.DisplayMember = "Text"
        Me.cmbBrand.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbBrand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbBrand.ItemHeight = 19
        Me.cmbBrand.Location = New System.Drawing.Point(20, 347)
        Me.cmbBrand.Name = "cmbBrand"
        Me.cmbBrand.Size = New System.Drawing.Size(219, 25)
        Me.cmbBrand.TabIndex = 147
        '
        'cmbMfr
        '
        Me.cmbMfr.DisplayMember = "Text"
        Me.cmbMfr.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbMfr.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbMfr.ItemHeight = 19
        Me.cmbMfr.Location = New System.Drawing.Point(20, 403)
        Me.cmbMfr.Name = "cmbMfr"
        Me.cmbMfr.Size = New System.Drawing.Size(219, 25)
        Me.cmbMfr.TabIndex = 147
        '
        'cmbCat
        '
        Me.cmbCat.DisplayMember = "Text"
        Me.cmbCat.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbCat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbCat.ItemHeight = 19
        Me.cmbCat.Location = New System.Drawing.Point(20, 459)
        Me.cmbCat.Name = "cmbCat"
        Me.cmbCat.Size = New System.Drawing.Size(219, 25)
        Me.cmbCat.TabIndex = 147
        '
        'cmbSubCat
        '
        Me.cmbSubCat.DisplayMember = "Text"
        Me.cmbSubCat.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbSubCat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbSubCat.ItemHeight = 19
        Me.cmbSubCat.Location = New System.Drawing.Point(309, 402)
        Me.cmbSubCat.Name = "cmbSubCat"
        Me.cmbSubCat.Size = New System.Drawing.Size(231, 25)
        Me.cmbSubCat.TabIndex = 147
        '
        'cmbSubSubCat
        '
        Me.cmbSubSubCat.DisplayMember = "Text"
        Me.cmbSubSubCat.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cmbSubSubCat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cmbSubSubCat.ItemHeight = 19
        Me.cmbSubSubCat.Location = New System.Drawing.Point(309, 458)
        Me.cmbSubSubCat.Name = "cmbSubSubCat"
        Me.cmbSubSubCat.Size = New System.Drawing.Size(231, 25)
        Me.cmbSubSubCat.TabIndex = 147
        '
        'cmdSave
        '
        Me.cmdSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
        Me.cmdSave.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdSave.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.cmdSave.Location = New System.Drawing.Point(786, 481)
        Me.cmdSave.Name = "cmdSave"
        Me.cmdSave.Size = New System.Drawing.Size(82, 27)
        Me.cmdSave.TabIndex = 294
        Me.cmdSave.Text = "Save"
        '
        'cmdExit
        '
        Me.cmdExit.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
        Me.cmdExit.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdExit.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer))
        Me.cmdExit.Location = New System.Drawing.Point(873, 481)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.Size = New System.Drawing.Size(80, 27)
        Me.cmdExit.TabIndex = 293
        Me.cmdExit.Text = "Exit"
        '
        'GroupPanel1
        '
        Me.GroupPanel1.CanvasColor = System.Drawing.SystemColors.Control
        Me.GroupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007
        Me.GroupPanel1.Controls.Add(Me.GroupBox2)
        Me.GroupPanel1.Controls.Add(Me.GroupBox1)
        Me.GroupPanel1.Controls.Add(Me.chDiscontinued)
        Me.GroupPanel1.Controls.Add(Me.Label21)
        Me.GroupPanel1.Controls.Add(Me.Label22)
        Me.GroupPanel1.Controls.Add(Me.Label24)
        Me.GroupPanel1.Controls.Add(Me.Label25)
        Me.GroupPanel1.Controls.Add(Me.Label26)
        Me.GroupPanel1.Controls.Add(Me.Label27)
        Me.GroupPanel1.Controls.Add(Me.Label23)
        Me.GroupPanel1.Controls.Add(Me.Label1)
        Me.GroupPanel1.Controls.Add(Me.Label2)
        Me.GroupPanel1.Controls.Add(Me.Label3)
        Me.GroupPanel1.Controls.Add(Me.Label4)
        Me.GroupPanel1.Controls.Add(Me.Label20)
        Me.GroupPanel1.Controls.Add(Me.Label5)
        Me.GroupPanel1.Controls.Add(Me.Label6)
        Me.GroupPanel1.Controls.Add(Me.Label7)
        Me.GroupPanel1.Controls.Add(Me.Label8)
        Me.GroupPanel1.Controls.Add(Me.Label9)
        Me.GroupPanel1.Controls.Add(Me.Label10)
        Me.GroupPanel1.Controls.Add(Me.Label13)
        Me.GroupPanel1.Controls.Add(Me.Label12)
        Me.GroupPanel1.Controls.Add(Me.Label11)
        Me.GroupPanel1.Controls.Add(Me.Label15)
        Me.GroupPanel1.Controls.Add(Me.Label16)
        Me.GroupPanel1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.GroupPanel1.Location = New System.Drawing.Point(0, 0)
        Me.GroupPanel1.Name = "GroupPanel1"
        Me.GroupPanel1.Size = New System.Drawing.Size(973, 520)
        '
        '
        '
        Me.GroupPanel1.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2
        Me.GroupPanel1.Style.BackColorGradientAngle = 90
        Me.GroupPanel1.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground
        Me.GroupPanel1.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderBottomWidth = 1
        Me.GroupPanel1.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder
        Me.GroupPanel1.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderLeftWidth = 1
        Me.GroupPanel1.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderRightWidth = 1
        Me.GroupPanel1.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid
        Me.GroupPanel1.Style.BorderTopWidth = 1
        Me.GroupPanel1.Style.CornerDiameter = 4
        Me.GroupPanel1.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded
        Me.GroupPanel1.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center
        Me.GroupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText
        Me.GroupPanel1.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near
        Me.GroupPanel1.TabIndex = 295
        Me.GroupPanel1.Text = "Product Master - Edit"
        '
        'ICproductsEdit
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(7, 19)
        Me.BackColor = System.Drawing.SystemColors.ActiveCaption
        Me.ClientSize = New System.Drawing.Size(973, 520)
        Me.ControlBox = False
        Me.Controls.Add(Me.cmdSave)
        Me.Controls.Add(Me.cmdExit)
        Me.Controls.Add(Me.cmbCat)
        Me.Controls.Add(Me.cmbSubSubCat)
        Me.Controls.Add(Me.cmbSubCat)
        Me.Controls.Add(Me.cmbMfr)
        Me.Controls.Add(Me.cmbBrand)
        Me.Controls.Add(Me.cmbDept)
        Me.Controls.Add(Me.dgShowroom)
        Me.Controls.Add(Me.tbImageFile)
        Me.Controls.Add(Me.dgBarcode)
        Me.Controls.Add(Me.dgSuppliers)
        Me.Controls.Add(Me.cmbUnit)
        Me.Controls.Add(Me.tbMarkup3)
        Me.Controls.Add(Me.tbMarkup2)
        Me.Controls.Add(Me.tbMarkup1)
        Me.Controls.Add(Me.tbPrice3)
        Me.Controls.Add(Me.tbPrice2)
        Me.Controls.Add(Me.tbPrice1)
        Me.Controls.Add(Me.tbLongDescA)
        Me.Controls.Add(Me.tbLongDescE)
        Me.Controls.Add(Me.tbShortDescA)
        Me.Controls.Add(Me.tbShortDescE)
        Me.Controls.Add(Me.tbManuf)
        Me.Controls.Add(Me.tbProdCode)
        Me.Controls.Add(Me.btnImage)
        Me.Controls.Add(Me.pbImage)
        Me.Controls.Add(Me.GroupBox3)
        Me.Controls.Add(Me.GroupPanel1)
        Me.Font = New System.Drawing.Font("Calibri", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.ForeColor = System.Drawing.SystemColors.ControlLightLight
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.Location = New System.Drawing.Point(70, 70)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "ICproductsEdit"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        CType(Me.dgShowroom, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.pbImage, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox1.PerformLayout()
        CType(Me.dgBarcode, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.dgSuppliers, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox2.ResumeLayout(False)
        Me.GroupBox2.PerformLayout()
        Me.GroupBox3.ResumeLayout(False)
        Me.GroupBox3.PerformLayout()
        Me.GroupPanel1.ResumeLayout(False)
        Me.GroupPanel1.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region

    Private Sub ICproductsEdit_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ProdID = dgProductSelectedID
        ShowProductData(ProdID)
        LoadProductSuppliers(CompanyID, ProdID)
        Dim ApData As New APdataLogic
        If ApData.IsValidUserOption(UserID, 0, 133) = True Then
            chActive.Enabled = True
        Else
            chActive.Enabled = False
        End If
        If ApData.IsValidUserOption(UserID, 0, 135) = True Then
            chOnPromotion.Enabled = True
        Else
            chOnPromotion.Enabled = False
        End If
        If ApData.IsValidUserOption(UserID, 0, 136) = True Then
            chKit.Enabled = True
        Else
            chKit.Enabled = False
        End If
        If ApData.IsValidUserOption(UserID, 0, 138) = True Then
            chDiscontinued.Enabled = True
        Else
            chDiscontinued.Enabled = False
        End If
        If ApData.IsValidUserOption(UserID, 0, 139) = True Then
            cbBlocked.Enabled = True
        Else
            cbBlocked.Enabled = False
        End If
        ApData = Nothing

    End Sub

    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        Me.Close()
    End Sub
    Private Sub GenerateProductCode()
        Dim BrandCode As String
        Dim ICdata As New ICdataLogic
        BrandCode = ICdata.GetBrandCode(cmbDept.SelectedValue)
        ICdata = Nothing
        If BrandCode <> "" And tbManuf.Text <> "" Then
            tbProdCode.Text = BrandCode.Trim + tbManuf.Text
            CheckProductCode(tbProdCode.Text)
        Else
            tbProdCode.Text = ""
        End If
    End Sub
    Private Sub CheckProductCode(ByVal ProdCode As String)
        If ProdCode <> OldProdCode Then
            Dim ICdata As New ICdataLogic
            If ICdata.ProductCodeExist(CompanyID, ProdCode) = True Then
                MsgBox("Product code already exist.", MsgBoxStyle.Critical, "Inventory Manager")
                tbManuf.Text = ""
                tbProdCode.Text = ""
            End If
        End If
    End Sub
    Private Sub ShowProductData(ByVal ProdID As Integer)
        Dim ICdata As New ICdataLogic
        If ICdata.IsBlockedCompanyProduct(CompanyID, ProdID) = True Then
            cbBlocked.Checked = True
        Else
            cbBlocked.Checked = False
        End If
        Dim ds As DataSet
        ds = ICdata.GetProductDetails(ProdID)
        tbProdCode.Text = ds.Tables(0).Rows(0).Item("PRODUCTCODE").ToString()
        tbManuf.Text = ds.Tables(0).Rows(0).Item("MANUFPRODUCTCODE").ToString()
        tbLeadTime.Text = ds.Tables(0).Rows(0).Item("LEADTIME").ToString()
        tbOuterPack.Text = ds.Tables(0).Rows(0).Item("OUTERPACKSIZE").ToString()
        tbImageFile.Text = ds.Tables(0).Rows(0).Item("IMAGEFILENAME").ToString()
        tbROL.Text = ds.Tables(0).Rows(0).Item("ROLQTY").ToString()
        tbMarkup3.Text = ds.Tables(0).Rows(0).Item("THIRDMARKUPPERCENT").ToString()
        tbMarkup2.Text = ds.Tables(0).Rows(0).Item("SECONDMARKUPPERCENT").ToString()
        tbMarkup1.Text = ds.Tables(0).Rows(0).Item("FIRSTMARKUPPERCENT").ToString()
        tbPrice3.Text = ds.Tables(0).Rows(0).Item("THIRDPRICE").ToString()
        tbPrice2.Text = ds.Tables(0).Rows(0).Item("SECONDPRICE").ToString()
        tbPrice1.Text = ds.Tables(0).Rows(0).Item("FIRSTPRICE").ToString()
        tbLongDescA.Text = ds.Tables(0).Rows(0).Item("LONGDESCRIPTIONA").ToString()
        tbLongDescE.Text = ds.Tables(0).Rows(0).Item("LONGDESCRIPTIONE").ToString()
        tbShortDescA.Text = ds.Tables(0).Rows(0).Item("SHORTDESCRIPTIONA").ToString()
        tbShortDescE.Text = ds.Tables(0).Rows(0).Item("SHORTDESCRIPTIONE").ToString()
        Group1Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP1CODE").ToString())
        Group2Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP2CODE").ToString())
        Group3Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP3CODE").ToString())
        Group4Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP4CODE").ToString())
        Group5Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP5CODE").ToString())
        Group6Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP6CODE").ToString())
        Group7Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP7CODE").ToString())
        Group8Code = Integer.Parse(ds.Tables(0).Rows(0).Item("GROUP8CODE").ToString())
        ' tbBarcode.Text = ds.Tables(0).Rows(0).Item("ROLQTY").ToString()
        chKit.Checked = Integer.Parse(ds.Tables(0).Rows(0).Item("KITFLAG").ToString())
        chOnPromotion.Checked = Integer.Parse(ds.Tables(0).Rows(0).Item("ONPROMOTIONFLAG").ToString())
        chActive.Checked = Integer.Parse(ds.Tables(0).Rows(0).Item("ACTIVEFLAG").ToString())
        Dim Discontinued1, Discontinued2 As Integer
        If Integer.Parse(ds.Tables(0).Rows(0).Item("DISCONTINUED").ToString()) > 0 Then
            Discontinued1 = 1
        End If
        If CompanyID > 0 Then
            Dim Disc2 As Integer = ICdata.GetCompanyDiscontinuedFlag(ProdID, CompanyID)
            If Disc2 > 0 Then
                Discontinued2 = 1
            End If
        End If
        chDiscontinued.Checked = Discontinued1
        cbCompDiscontinued.Checked = Discontinued2

        'chWhProduct.Checked = Integer.Parse(ds.Tables(0).Rows(0).Item("WHPRODUCTFLAG").ToString())
        Dim ItemType As Integer = Integer.Parse(ds.Tables(0).Rows(0).Item("PRODUCTTYPE").ToString())
        If ItemType = 1 Then
            rbStock.Checked = True
        Else
            If ItemType = 2 Then
                rbSample.Checked = True
            Else
                If ItemType = 3 Then
                    rbNonStock.Checked = True
                End If
            End If
        End If
        Dim ProductIndicator As Integer = Integer.Parse(ds.Tables(0).Rows(0).Item("PRODUCTINDICATOR").ToString())
        If ProductIndicator = 1 Then
            rbActiveProd.Checked = True
        Else
            If ProductIndicator = 2 Then
                rbTempDisc.Checked = True
            Else
                If ProductIndicator = 3 Then
                    rbRangedOut.Checked = True
                Else
                    If ProductIndicator = 4 Then
                        rbTobePurged.Checked = True
                    Else
                        If ProductIndicator = 6 Then
                            rbNIOH.Checked = True
                        Else
                            If ProductIndicator = 7 Then
                                rbPCI.Checked = True
                            End If
                        End If
                    End If
                End If
            End If
        End If
        cmbUnit.SelectedItem = ds.Tables(0).Rows(0).Item("SALEUNIT").ToString()
        cmbPack.SelectedItem = ds.Tables(0).Rows(0).Item("PACKVOLUMETYPE").ToString()
        cmbLead.SelectedItem = ds.Tables(0).Rows(0).Item("LEADTIMETYPE").ToString()
        OldProdCode = tbProdCode.Text
        LoadGroupCombos(CompanyID)
        LoadShowrooms(CompanyID, ProdID)
        LoadBarCodes(CompanyID, ProdID)
        'Dim ds2 As DataSet
        'ds2 = ICdata.GetProductBarCodeEntryList(ProdID)
        'dgBarcode.DataSource = ds2.Tables(0)
        'Dim ro As DataRow
        'For Each ro In ds2.Tables(0).Rows()
        '    tbBarcode.Text += ro.Item("PRODUCTBARCODE") + vbCrLf
        'Next
        If tbImageFile.Text.Trim <> "" Then
            ShowImage(tbImageFile.Text)
        End If
    End Sub
    Private Sub LoadGroupCombos(ByVal CompanyCode As Integer)
        Dim ICdata As New ICdataLogic
        Dim ds As DataSet
        CompanyCode = 0
        ds = ICdata.GetProductGroups(CompanyCode, 1)
        cmbDept.DataSource = ds.Tables(0)
        cmbDept.ValueMember = "GroupID"
        cmbDept.DisplayMember = "GroupName"
        cmbDept.SelectedValue = Group1Code
        '
        ds = ICdata.GetProductGroups(CompanyCode, 2)
        cmbBrand.DataSource = ds.Tables(0)
        cmbBrand.ValueMember = "GroupID"
        cmbBrand.DisplayMember = "GroupName"
        cmbBrand.SelectedValue = Group2Code
        '
        ds = ICdata.GetProductGroups(CompanyCode, 3)
        cmbMfr.DataSource = ds.Tables(0)
        cmbMfr.ValueMember = "GroupID"
        cmbMfr.DisplayMember = "GroupName"
        cmbMfr.SelectedValue = Group3Code
        '
        ds = ICdata.GetProductGroups(CompanyCode, 4)
        cmbCat.DataSource = ds.Tables(0)
        cmbCat.ValueMember = "GroupID"
        cmbCat.DisplayMember = "GroupName"
        cmbCat.SelectedValue = Group4Code
        '
        ds = ICdata.GetProductGroups(CompanyCode, 5)
        cmbSubCat.DataSource = ds.Tables(0)
        cmbSubCat.ValueMember = "GroupID"
        cmbSubCat.DisplayMember = "GroupName"
        cmbSubCat.SelectedValue = Group5Code
        '
        ds = ICdata.GetProductGroups(CompanyCode, 6)
        cmbSubSubCat.DataSource = ds.Tables(0)
        cmbSubSubCat.ValueMember = "GroupID"
        cmbSubSubCat.DisplayMember = "GroupName"
        cmbSubSubCat.SelectedValue = Group6Code
        '
        'ds = ICdata.GetProductGroups(CompanyCode, 7)
        'cmbGroup7.DataSource = ds.Tables(0)
        'cmbGroup7.ValueMember = "GroupID"
        'cmbGroup7.DisplayMember = "GroupName"
        'cmbGroup7.SelectedValue = Group7Code
        ''
        'ds = ICdata.GetProductGroups(CompanyCode, 8)
        'cmbGroup8.DataSource = ds.Tables(0)
        'cmbGroup8.ValueMember = "GroupID"
        'cmbGroup8.DisplayMember = "GroupName"
        'cmbGroup8.SelectedValue = Group8Code
        '
        ICdata = Nothing
    End Sub
    Private Sub LoadShowrooms(ByVal CompanyCode As Integer, ByVal ProdID As Integer)
        Dim ICdata As New ICdataLogic
        Dim ds As DataSet
        ds = ICdata.GetShowroomsRol(CompanyCode, ProdID)
        dgShowroom.DataSource = ds.Tables(0)
        ICdata = Nothing
        With dgShowroom
            .TableStyles.Clear()
            .CaptionBackColor = System.Drawing.Color.SlateBlue
            .CaptionForeColor = System.Drawing.Color.LemonChiffon
            .AllowSorting = True
            .AlternatingBackColor = System.Drawing.Color.AliceBlue
            .ParentRowsBackColor = System.Drawing.Color.Lavender
            .ParentRowsForeColor = System.Drawing.Color.SlateBlue
            .HeaderBackColor = System.Drawing.Color.LemonChiffon
            .AllowNavigation = False
            .ParentRowsVisible = False
            .RowHeadersVisible = False
        End With
        Dim cm As CurrencyManager = BindingContext(dgShowroom.DataSource, dgShowroom.DataMember)
        Dim dv As DataView = cm.List
        dv.AllowNew = False
        dgformat(ds.Tables(0).Rows.Count)
    End Sub
    Private Sub dgformat(ByVal RowCount As Integer)
        Dim grdTableStyle As New DataGridTableStyle
        With grdTableStyle
            .AlternatingBackColor = Color.AliceBlue
            .HeaderFont = New Font("calibri", 9.0!, FontStyle.Bold)
            .MappingName = "SHOWROOM"
            .PreferredColumnWidth = 140
            .HeaderBackColor = Color.LightSlateGray
            .HeaderForeColor = Color.LightCyan
            .PreferredRowHeight = 15
            .RowHeadersVisible = False
            .RowHeaderWidth = 0
        End With
        Dim cs1 As DataGridColumnStyle
        cs1 = New DataGridTextBoxColumn
        cs1.Width = 0
        cs1.MappingName = "DEPARTMENTID"
        cs1.HeaderText = "ID"
        cs1.NullText = ""
        cs1.ReadOnly = True
        grdTableStyle.GridColumnStyles.Add(cs1)
        '
        cs1 = New DataGridTextBoxColumn
        cs1.Width = 185
        cs1.MappingName = "DEPARTMENTNAME"
        cs1.HeaderText = "SHOWROOM"
        cs1.NullText = ""
        cs1.ReadOnly = True
        grdTableStyle.GridColumnStyles.Add(cs1)
        '
        cs1 = New DataGridTextBoxColumn
        cs1.Width = 41
        cs1.MappingName = "MINIMUMQTY"
        cs1.HeaderText = "QTY "
        cs1.NullText = ""
        cs1.ReadOnly = False
        cs1.Alignment = HorizontalAlignment.Center
        grdTableStyle.GridColumnStyles.Add(cs1)
        '
        dgShowroom.TableStyles.Add(grdTableStyle)
    End Sub
    Private Sub LoadBarCodes(ByVal CompanyCode As Integer, ByVal ProdID As Integer)
        Dim ICdata As New ICdataLogic
        Dim ds As DataSet
        ds = ICdata.GetProductBarCodeEntryList(ProdID)
        dgBarcode.DataSource = ds.Tables(0)
        ICdata = Nothing
        With dgBarcode
            .TableStyles.Clear()
            .CaptionBackColor = System.Drawing.Color.SlateBlue
            .CaptionForeColor = System.Drawing.Color.LemonChiffon
            .AllowSorting = True
            .AlternatingBackColor = System.Drawing.Color.AliceBlue
            .ParentRowsBackColor = System.Drawing.Color.Lavender
            .ParentRowsForeColor = System.Drawing.Color.SlateBlue
            .HeaderBackColor = System.Drawing.Color.LemonChiffon
            .AllowNavigation = True
            .ParentRowsVisible = False
            .RowHeadersVisible = False
        End With
        Dim cm As CurrencyManager = BindingContext(dgBarcode.DataSource, dgBarcode.DataMember)
        Dim dv As DataView = cm.List
        'dv.AllowNew = False
        dgformat3(ds.Tables(0).Rows.Count)
    End Sub
    Private Sub dgformat3(ByVal RowCount As Integer)
        Dim grdTableStyle As New DataGridTableStyle
        With grdTableStyle
            .AlternatingBackColor = Color.AliceBlue
            .HeaderFont = New Font("calibri", 9.0!, FontStyle.Bold)
            .MappingName = "BARCODE"
            .PreferredColumnWidth = 140
            .HeaderBackColor = Color.LightSlateGray
            .HeaderForeColor = Color.LightCyan
            .PreferredRowHeight = 15
            .RowHeadersVisible = False
            .RowHeaderWidth = 0
            .ColumnHeadersVisible = False
        End With
        Dim cs1 As DataGridColumnStyle
        cs1 = New DataGridTextBoxColumn
        cs1.Width = 128
        cs1.MappingName = "PRODUCTBARCODE"
        cs1.HeaderText = ""
        cs1.NullText = ""
        cs1.ReadOnly = False
        grdTableStyle.GridColumnStyles.Add(cs1)
        dgBarcode.TableStyles.Add(grdTableStyle)
    End Sub
    Private Sub btnImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImage.Click
        dlgOpen.ShowDialog()
        tbImageFile.Text = dlgOpen.FileName.ToString
        ShowImage(tbImageFile.Text)
    End Sub
    Public Sub ShowImage(ByVal fileToDisplay As String)
        Dim MyImage As Bitmap
        If Not (MyImage Is Nothing) Then
            MyImage.Dispose()
        End If
        pbImage.SizeMode = PictureBoxSizeMode.StretchImage
        pbImage.Visible = True
        Try
            MyImage = New Bitmap(fileToDisplay)
            pbImage.ClientSize = New Size(140, 121)
            pbImage.Image = CType(MyImage, Image)
        Catch ex As Exception
            tbImageFile.Text = ""
            MsgBox("Invalid Image File", MsgBoxStyle.Exclamation, "Inventory Manager")
            pbImage.Visible = False
            tbImageFile.Focus()
        End Try
    End Sub

    Private Sub tbImageFile_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles tbImageFile.Validating
        If tbImageFile.Text.Trim <> "" Then
            ShowImage(tbImageFile.Text)
        Else
            pbImage.Visible = False
        End If
    End Sub

    Private Sub tbPrice1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbPrice1.LostFocus
        If tbPrice1.Text.Trim <> "" Then
            If IsNumeric(tbPrice1.Text) Then
                tbPrice1.Text = FormatNumber(tbPrice1.Text, 3)
            Else
                MsgBox("Only numbers allowed for Price1", MsgBoxStyle.Information, "Inventory Manager")
                tbPrice1.Focus()
            End If
        End If
    End Sub

    Private Sub tbPrice2_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbPrice2.LostFocus
        If tbPrice2.Text.Trim <> "" Then
            If IsNumeric(tbPrice2.Text) Then
                tbPrice2.Text = FormatNumber(tbPrice2.Text, 3)
            Else
                MsgBox("Only numbers allowed for Price2", MsgBoxStyle.Information, "Inventory Manager")
                tbPrice2.Focus()
            End If
        End If
    End Sub

    Private Sub tbPrice3_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbPrice3.LostFocus
        If tbPrice3.Text.Trim <> "" Then
            If IsNumeric(tbPrice3.Text) Then
                tbPrice3.Text = FormatNumber(tbPrice3.Text, 3)
            Else
                MsgBox("Only numbers allowed for Price1", MsgBoxStyle.Information, "Inventory Manager")
                tbPrice3.Focus()
            End If
        End If
    End Sub

    Private Sub tbMarkup1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbMarkup1.LostFocus
        If tbMarkup1.Text.Trim <> "" Then
            If IsNumeric(tbMarkup1.Text) Then
                tbMarkup1.Text = FormatNumber(tbMarkup1.Text, 2)
            Else
                MsgBox("Only numbers allowed for Markup1", MsgBoxStyle.Information, "Inventory Manager")
                tbMarkup1.Focus()
            End If
        End If
    End Sub

    Private Sub tbMarkup2_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbMarkup2.LostFocus
        If tbMarkup2.Text.Trim <> "" Then
            If IsNumeric(tbMarkup2.Text) Then
                tbMarkup2.Text = FormatNumber(tbMarkup2.Text, 2)
            Else
                MsgBox("Only numbers allowed for Markup2", MsgBoxStyle.Information, "Inventory Manager")
                tbMarkup2.Focus()
            End If
        End If
    End Sub

    Private Sub tbMarkup3_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbMarkup3.LostFocus
        If tbMarkup3.Text.Trim <> "" Then
            If IsNumeric(tbMarkup3.Text) Then
                tbMarkup3.Text = FormatNumber(tbMarkup3.Text, 2)
            Else
                MsgBox("Only numbers allowed for Markup3", MsgBoxStyle.Information, "Inventory Manager")
                tbMarkup3.Focus()
            End If
        End If
    End Sub
    Private Sub tbROL_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbROL.LostFocus
        If tbROL.Text.Trim <> "" Then
            If Not IsNumeric(tbROL.Text) Then
                MsgBox("Only numbers allowed for ROL", MsgBoxStyle.Information, "Inventory Manager")
                tbROL.Focus()
            End If
        End If
    End Sub

    Private Sub tbOuterPack_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbOuterPack.LostFocus
        If tbOuterPack.Text.Trim <> "" Then
            If Not IsNumeric(tbOuterPack.Text) Then
                MsgBox("Only numbers allowed for Outer Pack", MsgBoxStyle.Information, "Inventory Manager")
                tbOuterPack.Focus()
            End If
        End If
    End Sub

    Private Sub tbLeadTime_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbLeadTime.LostFocus
        If tbLeadTime.Text.Trim <> "" Then
            If Not IsNumeric(tbLeadTime.Text) Then
                MsgBox("Only numbers allowed for Lead Time", MsgBoxStyle.Information, "Inventory Manager")
                tbLeadTime.Focus()
            End If
        End If
    End Sub

    Private Function ValidateInputData() As Boolean
        ValidateInputData = True
        If cmbDept.SelectedValue = 0 Then
            MsgBox("Select Brand", MsgBoxStyle.Exclamation, "Inventory Manager")
            cmbDept.Focus()
            Return False
        End If
        If tbManuf.Text.Trim = "" Then
            MsgBox("Enter Manufacturor Product Code", MsgBoxStyle.Exclamation, "Inventory Manager")
            tbManuf.Focus()
            Return False
        End If
        If tbProdCode.Text.Trim = "" Then
            MsgBox("Select Brand and Enter Manufacturor Product Code" & vbLf & "to generate Product Code", MsgBoxStyle.Exclamation, "Inventory Manager")
            tbManuf.Focus()
            Return False
        End If
        If cmbUnit.SelectedItem = "" Then
            MsgBox("Select Sale Unit", MsgBoxStyle.Exclamation, "Inventory Manager")
            cmbUnit.Focus()
            Return False
        End If
        If cmbPack.SelectedItem = "" Then
            MsgBox("Select Outer Pack Size", MsgBoxStyle.Exclamation, "Inventory Manager")
            cmbPack.Focus()
            Return False
        End If
        If cmbPack.SelectedItem = "" Then
            MsgBox("Select Lead Time", MsgBoxStyle.Exclamation, "Inventory Manager")
            cmbPack.Focus()
            Return False
        End If
        Return True
    End Function

    Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
        Dim ICdata As New ICdataLogic
        Dim ItemType As Integer
        ItemType = 1
        If rbStock.Checked = True Then
            ItemType = 1
        Else
            If rbSample.Checked = True Then
                ItemType = 2
            Else
                If rbNonStock.Checked = True Then
                    ItemType = 3
                End If
            End If
        End If
        Dim ProductIndicator As Integer
        ProductIndicator = 1
        If rbActiveProd.Checked = True Then
            ProductIndicator = 1
        Else
            If rbTempDisc.Checked = True Then
                ProductIndicator = 2
            Else
                If rbRangedOut.Checked = True Then
                    ProductIndicator = 3
                Else
                    If rbTobePurged.Checked = True Then
                        ProductIndicator = 4
                    Else
                        If rbNIOH.Checked = True Then
                            ProductIndicator = 6
                        Else
                            If rbPCI.Checked = True Then
                                ProductIndicator = 7
                            End If
                        End If
                    End If
                End If
            End If
        End If
        Dim ActiveFlag As Integer
        If chActive.Checked = True Then
            ActiveFlag = 1
        Else
            ActiveFlag = 0
        End If
        Dim OnPromotionFlag As Integer
        If chOnPromotion.Checked = True Then
            OnPromotionFlag = 1
        Else
            OnPromotionFlag = 0
        End If
        Dim KitFlag As Integer
        If chKit.Checked = True Then
            KitFlag = 1
        Else
            KitFlag = 0
        End If
        Dim WhProductFlag As Integer
        If chWhProduct.Checked = True Then
            WhProductFlag = 1
        Else
            WhProductFlag = 0
        End If
        Dim ThisYear As Integer = Now.Year
        Dim FinYear As Integer = ThisYear
        If Now.Month > 4 Then
            FinYear = FinYear + 1
        End If

        Dim StatusFlag, StatusFlag2 As Integer
        StatusFlag = 0
        If chDiscontinued.Checked = True Then
            If ICdata.IsGlobalTransExist(ProdID) = True Then
                MsgBox("Can't discontinue product (group) with transaction or quantity!", MsgBoxStyle.Critical, "Inventory Manager")
                Exit Sub
            Else
                StatusFlag = FinYear
            End If
        Else
            StatusFlag = 0
        End If
        If cbCompDiscontinued.Checked = True Then
            If ICdata.IsCompanyTransExist(ProdID, CompanyID) = True Then
                MsgBox("Can't discontinue product (company) with transaction or quantity!", MsgBoxStyle.Critical, "Inventory Manager")
                Exit Sub
            Else
                StatusFlag2 = FinYear
            End If
        Else
            StatusFlag2 = 0
        End If
        Dim BlockedFlag As Integer
        If cbBlocked.Checked = True Then
            BlockedFlag = 1
        Else
            BlockedFlag = 0
        End If

        If ValidateInputData() = True Then
            Dim ShowroomXml As String
            Dim BarCodeXml As String
            Dim rowCount2 As Integer = dgBarcode.BindingContext(dgBarcode.DataSource, dgBarcode.DataMember).Count
            Dim row2 As Integer = 0
            Dim i As Integer
            BarCodeXml = "<BarCodes><BarCode>" & tbProdCode.Text.Trim & "</BarCode>"
            For row2 = 0 To rowCount2 - 1
                If dgBarcode(row2, 0).ToString.Trim <> "" Then
                    If dgBarcode(row2, 0).ToString.Trim <> tbProdCode.Text.Trim Then
                        If dgBarcode(row2, 0).ToString.Trim <> OldProdCode Then
                            BarCodeXml += "<BarCode>" & dgBarcode(row2, 0).ToString.Trim & "</BarCode>"
                        End If
                    End If
                End If
            Next
            BarCodeXml += "</BarCodes>"
            Dim rowCount As Integer = dgShowroom.BindingContext(dgShowroom.DataSource, dgShowroom.DataMember).Count
            Dim row As Integer = 0
            Dim ShowroomID As Integer
            Dim RolQty As Decimal
            ShowroomXml = "<ShowRooms>"
            For row = 0 To rowCount - 1
                ShowroomID = dgShowroom(row, 0)
                RolQty = dgShowroom(row, 2)
                ShowroomXml += "<Showroom>" & "<ID>" & ShowroomID & "</ID><QTY>" & RolQty & "</QTY></Showroom>"
            Next
            ShowroomXml += "</ShowRooms>"
            '
            Dim ProdSupXml As String
            rowCount = dgSuppliers.BindingContext(dgSuppliers.DataSource, dgSuppliers.DataMember).Count
            row = 0
            Dim SupEntry As Boolean = False
            Dim SupID As Integer
            ProdSupXml = "<ProdSups>"
            For row = 0 To rowCount - 1
                If dgSuppliers(row, 2) = True Then
                    SupID = dgSuppliers(row, 0)
                    ProdSupXml += "<Supplier><ID>" & SupID & "</ID></Supplier>"
                    SupEntry = True
                End If
            Next
            ProdSupXml += "</ProdSups>"

            If SupEntry = False Then
                MsgBox("Atleast one supplier to be selected", MsgBoxStyle.Exclamation, "Inventory Manager")
                dgSuppliers.Focus()
                Exit Sub
            End If

            Dim ImgFile As String
            ImgFile = tbImageFile.Text
            If ImgFile.Trim = "" Then
                ImgFile = " "
            End If
            Dim mLead As String
            If cmbLead.Text.Trim = "" Then
                mLead = "PCS"
            Else
                mLead = cmbLead.Text
            End If
            Try
                ICdata.UpdateProductData(ProdID, cmbDept.SelectedValue, tbManuf.Text, _
                        tbProdCode.Text, tbShortDescE.Text, tbShortDescA.Text, _
                        tbLongDescE.Text, tbLongDescA.Text, cmbBrand.SelectedValue, _
                        cmbMfr.SelectedValue, cmbCat.SelectedValue, cmbSubCat.SelectedValue, _
                        tbPrice1.Text.Replace(",", ""), tbPrice2.Text.Replace(",", ""), tbPrice3.Text.Replace(",", ""), tbMarkup1.Text.Replace(",", ""), _
                        tbMarkup2.Text.Replace(",", ""), tbMarkup3.Text.Replace(",", ""), cmbUnit.Text, tbROL.Text, _
                        tbLeadTime.Text, mLead, ItemType, ProductIndicator, tbOuterPack.Text, _
                        cmbPack.Text, ImgFile, ActiveFlag, OnPromotionFlag, _
                        KitFlag, WhProductFlag, StatusFlag, StatusFlag2, BlockedFlag, cmbSubSubCat.SelectedValue, cmbGroup7.SelectedValue, cmbGroup8.SelectedValue, ShowroomXml, BarCodeXml, ProdSupXml)
                MsgBox("Product:" & tbProdCode.Text & " updated.", MsgBoxStyle.Information, "Inventory Manager")
            Catch Ex As Exception
                MsgBox("Unable to satisfy your request." & vbLf & "Try again later.", MsgBoxStyle.Critical, "Inventory Manager")
            Finally
                ICdata = Nothing
            End Try
        End If
    End Sub

    Private Sub ICproductsEdit_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
        Select Case e.KeyValue
            Case 13
                SendKeys.Send("{Tab}")
            Case 27
                cmdExit.PerformClick()
        End Select
    End Sub
    Private Sub LoadProductSuppliers(ByVal CompanyCode As Integer, ByVal ProductID As Integer)
        Dim ICdata As New ICdataLogic
        Dim ds As DataSet
        ds = ICdata.GetProductSupplierPrompt(CompanyCode, ProductID)
        dgSuppliers.DataSource = ds.Tables(0)
        ICdata = Nothing
        With dgSuppliers
            .TableStyles.Clear()
            .CaptionBackColor = System.Drawing.Color.SlateBlue
            .CaptionForeColor = System.Drawing.Color.LemonChiffon
            .AllowSorting = True
            .AlternatingBackColor = System.Drawing.Color.AliceBlue
            .ParentRowsBackColor = System.Drawing.Color.Lavender
            .ParentRowsForeColor = System.Drawing.Color.SlateBlue
            .HeaderBackColor = System.Drawing.Color.LemonChiffon
            .AllowNavigation = False
            .ParentRowsVisible = False
            .RowHeadersVisible = False
        End With
        Dim cm As CurrencyManager = BindingContext(dgSuppliers.DataSource, dgSuppliers.DataMember)
        Dim dv As DataView = cm.List
        dv.AllowNew = False
        dgformat2(ds.Tables(0).Rows.Count)
    End Sub
    Private Sub dgformat2(ByVal RowCount As Integer)
        Dim grdTableStyle2 As New DataGridTableStyle
        With grdTableStyle2
            .AlternatingBackColor = Color.AliceBlue
            .HeaderFont = New Font("Calibri", 9.0!, FontStyle.Bold)
            .MappingName = "SUPPLIER"
            .PreferredColumnWidth = 140
            .HeaderBackColor = Color.LightSlateGray
            .HeaderForeColor = Color.LightCyan
            .PreferredRowHeight = 15
            .RowHeadersVisible = False
            .RowHeaderWidth = 0
        End With
        Dim cs1 As DataGridColumnStyle
        cs1 = New DataGridTextBoxColumn
        cs1.Width = 0
        cs1.MappingName = "SUPID"
        cs1.HeaderText = "ID"
        cs1.NullText = ""
        cs1.ReadOnly = True
        grdTableStyle2.GridColumnStyles.Add(cs1)
        '
        cs1 = New DataGridTextBoxColumn
        cs1.Width = 190
        cs1.MappingName = "SUPNAME"
        cs1.HeaderText = "SUPPLIER NAME"
        cs1.NullText = ""
        cs1.ReadOnly = True
        grdTableStyle2.GridColumnStyles.Add(cs1)
        '
        Dim cs2 As DataGridBoolColumn
        cs2 = New DataGridBoolColumn
        cs2.Width = 30
        cs2.MappingName = "VALIDSUP"
        cs2.ReadOnly = False
        cs2.FalseValue = 0
        cs2.TrueValue = 1
        cs2.AllowNull = False
        'SetBoolColumnValues()
        grdTableStyle2.GridColumnStyles.Add(cs2)
        '
        dgSuppliers.TableStyles.Add(grdTableStyle2)
        ''
    End Sub
    Private Sub dgSuppliers_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dgSuppliers.MouseUp
        Dim pt As New Point(e.X, e.Y)
        Dim hti As DataGrid.HitTestInfo = dgSuppliers.HitTest(pt)
        If hti.Type = DataGrid.HitTestType.Cell Then
            dgSuppliers.CurrentCell = New DataGridCell(hti.Row, hti.Column)
            dgSuppliers.Select(hti.Row)
            Dim CurrentRow As Integer = dgSuppliers.CurrentCell.RowNumber
            If dgSuppliers.Item(CurrentRow, 2) = True Then
                dgSuppliers.Item(CurrentRow, 2) = False
            Else
                dgSuppliers.Item(CurrentRow, 2) = True
            End If
        End If
    End Sub
    Private Sub tbManuf_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbManuf.Validated
        GenerateProductCode()
    End Sub

    Private Sub cmbGroup1_Validated(ByVal sender As Object, ByVal e As System.EventArgs)
        GenerateProductCode()
    End Sub

    Private Sub dgBarcode_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dgBarcode.KeyUp
        If dgBarcode.CurrentCell.ToString <> "" Then
            If e.KeyValue = 13 Then
                SendKeys.Send("{Tab}")
            End If
        End If
    End Sub

    
End Class
